package modelos_programa;

public class Verificador_Double  {
	
	public int LeeDouble(String numero){
		
	int cont;
	int n=0;
	char x;
	
	cont =0;
	for (int i=0;i<numero.length();i++){
		x = numero.charAt(i);
		
		if  (!(x>=48&&x<=57||x==46)){
		
			System.out.println ("ERROR1");
                        n=1;
			break;
		}
		if (x==46)
			cont+=1;
		
		if (cont >=2){
			System.out.println ("ERROR2");
                        n=1;
		 	break;
		}		 	
	}
				
	return n;
	}

    
    
}
